package com.warm.common.anno;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import java.util.regex.Pattern;

public class AgeValidator implements ConstraintValidator<Age, Integer> {

    @Override
    public void initialize(Age constraintAnnotation) {
    }

    @Override
    public boolean isValid(Integer value, ConstraintValidatorContext context) {
        return value < 20;
    }
}
